from app import db
from datetime import datetime


class Product(db.Model):
    __tablename__ = 't_product'
    id = db.Column(db.Integer, primary_key=True)
    product_type_code = db.Column(db.Integer, nullable=False)
    type = db.Column(db.String(255), nullable=False)
    product_name = db.Column(db.String(255), nullable=False)
    image = db.Column(db.String(255), nullable=False)
    introduce = db.Column(db.Text, nullable=False)
    create_time = db.Column(db.DATETIME, default=datetime.now)
    update_time = db.Column(db.DATETIME, default=datetime.now)
